package cn.com.tianpeidong.restaurantadmin.common.constant;

/**
 * @author tianpeidong
 * @version since
 */
public enum PlatformError {

    /**
     * 服务器内部错误
     */
    INTERNAL_ERROR(50000, "服务器内部错误"),
    /**
     *
     */
    BAD_REQUEST(40000, "错误的请求"),


    PARAMETER_ERROR(40001, "参数错误"),
    /**
     * 登录过期
     */
    LOGIN_EXPIRED(40100, "登录过期"),

    /**
     * 用户名或密码错误
     */
    AUTH_FAIL(40101, "用户名或密码错误"),

    /**
     * 用户不存在
     */
    USER_NOT_EXIST(40102, "用户不存在"),

    /**
     * 未授权
     */
    UNAUTHORIZED(40300, "服务未授权"),

    /**
     * 未登录
     */
    UNAUTHENCATED(40103, "未登录"),

    RESOURCES_NOT_EXIST(40400, "资源不存在"),

    ;


    private Integer code;
    private String description;

     PlatformError(Integer code, String description) {
        this.code = code;
        this.description = description;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String discription) {
        this.description = description;
    }
}